package protagonist.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.context.annotation.Configuration;
import protagonist.annotation.LimitReq;

@Aspect
@Configuration
@Slf4j(topic = "LimitReqAspect")
public class LimitReqAspect {

    @After("@annotation(annotation)")
    public void after(JoinPoint joinPoint, LimitReq annotation){
        int count = annotation.count();
        long time = annotation.time();
        log.info("执行了LimitReqAspect....");
    }

}
